package cn.iocoder.yudao.module.lowcode.controller.admin.datasource.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

@Schema(description = "管理后台 - 低代码数据源连接测试 Request VO")
@Data
public class LowcodeDataSourceTestReqVO {

    @Schema(description = "数据库类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "mysql")
    @NotEmpty(message = "数据库类型不能为空")
    private String type;

    @Schema(description = "数据源连接URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "jdbc:mysql://127.0.0.1:3306/test")
    @NotEmpty(message = "数据源连接URL不能为空")
    private String url;

    @Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "root")
    @NotEmpty(message = "用户名不能为空")
    private String username;

    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
    @NotEmpty(message = "密码不能为空")
    private String password;

    @Schema(description = "驱动类名", example = "com.mysql.cj.jdbc.Driver")
    private String driverClassName;

}